
		<div id="main-content"> <!-- Main Content Section with everything -->			
			<!-- Page Head -->			
			<form name='search' method='get' action=''>
				<label>关键词：</label>
				<input class="text-input" id='key' type='text' name='key' value='<?php echo $search['key']?$search['key']:'';?>' />
				修改时间
				<input class="text-input time" type="text" id="from" name="from" value='<?php echo $search['from']?$search['from']:'';?>' />
				~
				<input class="text-input time" type="text" id="to" name="to" value='<?php echo $search['to']?$search['to']:'';?>' />
				<input class="button" type='submit' value='搜索' />
				<input class='reset button' type='button' value='重置'/>
			</form>				
			<div class="clear"></div> <!-- End .clear -->
			
			<div class="content-box"><!-- Start Content Box -->
				
				<div class="content-box-header">
					
					<h3>日志管理</h3>					
					<div class="clear"></div>
					
				</div> <!-- End .content-box-header -->
				
				<div class="content-box-content">
					
					<div class="tab-content default-tab" id="tab1"> <!-- This is the target div. id must match the href of this div's tab -->						
						<table>
							
							<thead>
								<tr>
								   
								   <th>No.</th>
								   <th>内容</th>
								   <th>备注</th>
								   <th>创建时间</th>
								   <th>修改时间</th>
								</tr>
								
							</thead>
						 
							<tfoot>
								<tr>
									<td colspan="8">										
										<div class="pagination">
											<?php echo $page;?><!-- 分页 -->										
										</div> <!-- End .pagination -->
										<div class="clear"></div>
									</td>
								</tr>
							</tfoot>
						 
							<tbody>
							<?php date_default_timezone_set('PRC');?>
							<?php $i=0; foreach($query as $row):?>
								<tr>									
									<td><?php $i++;echo $i;?></td>
									<td><?php echo $row['content'];?></td>
									<td class='create-user'><?php echo $row['remark'];?><input type="hidden" value="<?php echo $row['id'];?>"></td>
									<td><?php echo date('Y-m-d H:i:s',$row['created']);?></td>
									<td><?php echo date('Y-m-d H:i:s',$row['changed']);?></td>
									
								</tr>
							<?php endforeach;?>	
							</tbody>
							
						</table>
						
					</div> <!-- End #tab1 -->
					
	
					
				</div> <!-- End .content-box-content -->
				
			</div> <!-- End .content-box -->
			<div class="clear"></div>			
		</div> <!-- End #main-content -->	
	</div>
	
	<div id="dialog-form" title="编辑日志备注">
		<form id='log' method='post' action="<?php echo base_url()?>logs/modify">		
			<label for="remark">内容</label>
			<input type="text" name="remark" id="remark" class="text ui-widget-content ui-corner-all" style="width:300px;" value='' />
			<input type="hidden" name="id" id='rid' value='' />
			<input type="hidden" name='url' value='<?php echo $_SERVER['QUERY_STRING'];?>' />
		</form>
	</div>
</body>
  

<!-- Download From www.exet.tk-->
</html>
<script type='text/javascript'>
	$(function() {		
		$( "#dialog-form" ).dialog({
			autoOpen: false,
			//show: "slide",
			//hide: "explode",
			height: 200,
			width: 350,
			modal: true,
			buttons: {
				Submit: function() {
					$('#log').submit();
				},
				Cancel: function() {
					$( this ).dialog( "close" );
				}
			},
			close: function() {
				allFields.val( "" ).removeClass( "ui-state-error" );
			}
		});

		$( ".create-user" ).dblclick(function() {
			str =$(this).text();
			id = $(this).find('input').val();
			$("#rid").val(id);
			$("#remark").val(str);
			$( "#dialog-form" ).dialog( "open" );
		});
		//time
		var dates = $( "#from, #to" ).datepicker({
			defaultDate: "+1w",
			changeMonth: true,
			numberOfMonths: 3,
			dateFormat: 'yy-mm-dd',
			onSelect: function( selectedDate ) {
				var option = this.id == "from" ? "minDate" : "maxDate",
					instance = $( this ).data( "datepicker" ),
					date = $.datepicker.parseDate(
						instance.settings.dateFormat ||
						$.datepicker._defaults.dateFormat,
						selectedDate, instance.settings );
				dates.not( this ).datepicker( "option", option, date );
			}
		});
	});
</script>